#include <windows.h>
#include "DIVA_VM.h"

string valuableNames = "";
bool bRefIn = false;
bool bRefOut = false;
bool bCancel_sta = false;
int level = 0;

void sbuttonManage(WPARAM wParam, HWND hDlg){
	/*
	switch (LOWORD(wParam)) {
			case IDCANCEL:
				bCancel_sta = true;
				EndDialog(hDlg, TRUE);
			case IDOK:
				HWND hRatio;
				BOOL bSuccess;

				hRatio = GetDlgItem(hDlg,IDC_IN);
				bRefIn = (int)SendMessage(hRatio, BM_GETCHECK, 0, 0);
				hRatio = GetDlgItem(hDlg,IDC_OUT);
				bRefOut = (int)SendMessage(hRatio, BM_GETCHECK, 0, 0);
				level = GetDlgItemInt(hDlg, IDC_LEVEL, &bSuccess, FALSE);

				int len;
				len = GetWindowTextLength(GetDlgItem(hDlg, IDC_VNAMES));
				if(len > 0){
					char* buf;
					buf = (char*)GlobalAlloc(GPTR, len + 1);
					GetDlgItemText(hDlg, IDC_VNAMES, buf, len + 1);
					valuableNames = buf;
					GlobalFree((HANDLE)buf);
				}
				EndDialog(hDlg, TRUE);

	}
	*/
}

BOOL CALLBACK StaticLayoutDialog( HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
{
	LPDRAWITEMSTRUCT lpdis;

	switch (message) {

		case WM_INITDIALOG:
			bCancel_sta = false;
			break;
		case WM_PAINT:
			break;

		case WM_COMMAND: 
			sbuttonManage(wParam, hDlg); 
			return (TRUE); 

		case WM_DRAWITEM: 
			lpdis = (LPDRAWITEMSTRUCT) lParam; 
			return (TRUE); 
	}
	return (FALSE); 
}